<script type="text/javascript">
	function convertHistoryPrev(user_id){
		var prev = <?php echo $change_history_curPage; ?> - 1;
		var url = "/Product/changeHistory?g_id="+user_id+"&curPage="+prev;
		//alert(url);
		doPost(url,'','convertHistoryDiv');		
	}
	function convertHistoryNext(user_id){
		var next = <?php echo $change_history_curPage; ?> + 1;
		var url = "/Product/changeHistory?g_id="+user_id+"&curPage="+next;
		//alert(url);
		doPost(url,'','convertHistoryDiv');	
	}	
</script>
<table>
	<tr>
      <td height="">&nbsp;</td>
      <td>
	  	<div id="record_list" class="rec_div">
	  	<?php
			if(!empty($changeHistoryList)){
			foreach($changeHistoryList as $key => $value){ ?>
			<div style="overflow:hidden; float:left">
		  		<table width="250" height="100px" border="0" cellspacing="0" cellpadding="0">
	                    <tr>
	                      <td width="250" align="center">
							<?php if(!empty($value['i']['g_img'])) { ?>
                      			 <img border='0' width="115" src="<?php echo SystemProperties::$app_upload_img_host;?>/<?php echo  $value['i']['g_img'] ?>"/>
                      		<?php }else{ ?>
                      			 <img border='0' width="115" src="<?php echo SystemProperties::$path;?>/img/noimg.png"/>
                      		<?php } ?>
						  </td>
	                    </tr>
	                    <tr>
	                      <td align="center" style="padding-top:5px;"><?php echo $value[0]['g_time'] ?> 兑换
	                      <?php if ($value['i']['is_coupon']==1 && $value['i']['user_id'] == $_SESSION['user_id']){ ?>
	                      优惠码：<b style="color:red"><?=$value['i']['remark']?></b><br />
	                      <?php } ?>
	                      </td>
	                    </tr>
	                   
						<tr>
	                      <td align="center">&nbsp;</td>
	                    </tr>
			    </table>
		  </div>
		 <?php }}else {?>
		 	<div style="overflow:hidden; float:left">暂时没有记录</div>
		 <?php } ?>
		</div>
	  </td>
      <td>&nbsp;</td>
    </tr>
    <?php if(!empty($changeHistoryList)){ ?>
	<tr>
        <td colspan="3" height="30" align="center" valign="middel">
        	<a href="javascript:convertHistoryPrev(<?php echo $user_id;?>);"><img src="<?php echo SystemProperties::$path;?>/img/prev.gif" border="0" /></a>
			&nbsp;&nbsp;&nbsp;<?php echo $change_history_curPage;?>/<?php echo $change_history_totalPage;?>&nbsp;&nbsp;&nbsp;
			<a href="javascript:convertHistoryNext(<?php echo $user_id;?>);"><img src="<?php echo SystemProperties::$path;?>/img/next.gif" border="0"/></a>
		</td>
     </tr>
    <?php }else{ ?>
 	<tr> 
 	 	<td colspan="3" height="30" align="center" valign="middel"></td>
 	</tr>
    <?php } ?>
</table>